package com.gdsdxy.bookshop.service;

import com.gdsdxy.bookshop.dao.AddressMapper;
import com.gdsdxy.bookshop.pojo.Address;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AddressService {
    @Autowired
    AddressMapper addressMapper;
    /**
     * 功能描述：在地址表Address中添加一条记录，返回添加记录的主键
     * author：姚宝如
     * @param address 用户地址
     * @return 返回新增记录的主键ID
     */
    public Integer addaddress(Address address) {
        addressMapper.insert(address);
        return address.getAddressid();
    }
}

